import Mock from 'mockjs'

const data = Mock.mock({
  'tabCar|10': [{
    "title": "@ctitle(2,4)",
    "id": "@id",
    "children|5-10": [{
      'title': "@ctitle",
      "url": "@image(100x100, @color)",
      "id": "@id",
      "price": '@integer(10, 1000)',
      "count": 0,
      "desc": "@cword(10, 20)"
    }]
  }]
})

Mock.mock('/api/tabcar', () => {
  return {
    code: 200,
    data: data.tabCar
  }
})